<!-- 流行病调查 -->
<template>
    <div class="container-box">
      <div class="left" v-for="(item,index) in list" :key="index">
        <div>
          <label for="">回溯时间：</label><span>{{parseTime(item.backtrackingTime,'{y}-{m}-{d}')}}</span>
        </div>
        <div>
          <label for="">旅居生活史、阳性个案接触史：</label><span>{{item.livingHistory}}</span>
        </div>
        <div>
          <label for="">症状：</label><span>{{item.symptom}}</span>
        </div>
        <div>
          <label for="">检测阳性日期：</label><span>{{parseTime(item.positiveDate,'{y}-{m}-{d}')}}</span>
        </div>
          
      </div>
      
    </div>
  </template>
  
  <script>
  import {defineComponent, onMounted, reactive,toRefs} from 'vue'
  import axios from '@/util/http'
  import {parseTime} from '@/util/date'
  import {useRouter} from 'vue-router'
  export default defineComponent({
      name:'EditorialOnsetVisits',
      setup(){
        const Msg  = reactive({
          list:[]
        })
        const patientId =useRouter().currentRoute._value.query.id
        onMounted(()=>{
          axios({
            method:'get',
            url:'patient/findPatientEpidemiology',
            params:{
              patientId
            }
          }).then((res)=>{
            console.log(res)
            Msg.list = res.data.data
          })
        })
        return{
          ...toRefs(Msg),parseTime
        }
      }
      
  })
  </script>
  
  <style scoped> 
  .container-box{
    box-sizing: border-box;
    width: 100%;
    padding: 50px 20px;
    background-color: white;
  }
  .left{
    float: left;
    width: 50%;
    font-size: 13px;
    color: #333;
  }
  .right{
    float: left;
    width: 50%;
    font-size: 13px;
    color: #333;
  }
  label{
    box-sizing: border-box;
    height:45px;
    display:inline-block;
    padding: 15px 10px;
  }

  .right label{
    font-weight: 650;
  }
  </style>